<template>
  <van-tabs v-model:active="active">
    <van-tab v-for="item in list" :key="item.id" :title="item.text"></van-tab>
  </van-tabs>
</template>

<script setup lang="ts">
import { ref,onMounted } from 'vue'
import axios from 'axios'
const active = ref(0)
const list = ref<INvaTtem[]>([])

interface INvaTtem{
  id:string,
  text:string
}

onMounted (() => {
  getLun()
})

const getLun = async ()=>{
 const res = await axios({
    url:'/navList',
    method:'get'
  })
  list.value = res.data.result
  console.log(list.value)
   
}

</script>
<style>
.van-tabs__line {
  background-color: #fb7299;
}
</style>